package com.cadre.system;

import com.alibaba.fastjson.JSONArray;

import java.util.Map;

/* loaded from: ZhijiStringBuild.class */
public class ZhijiStringBuild extends SQLStringBuild {
    @Override // com.tdqy.cadre.modular.profess.common.SQLStringBuild
    public String builder(Map<String, Object> map) {
        StringBuilder sqlbuilder = new StringBuilder("select personid from d_persontag d where ");
        sqlbuilder.append("d.tagid = ").append(map.get("tagId").toString());
        JSONArray valuestring = (JSONArray) map.get("valueString");
        for (int i = 0; i < valuestring.size(); i++) {
            if (i == 0) {
                sqlbuilder.append(" and ( d.valuestring = '").append(valuestring.get(i)).append("'");
            } else {
                sqlbuilder.append(" or d.valuestring = '").append(valuestring.get(i)).append("'");
            }
        }
        sqlbuilder.append(")");
        return sqlbuilder.toString();
    }
}
